package day03;

import java.util.Scanner;

/**
 * @author yzh
 * @desc TODO
 * @date 2025/4/9
 */
public class Test02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入学员的考试成绩: ");
        int score = sc.nextInt();

        if (score < 0 || score > 100) {
            System.out.println("无效分数");
        } else {
            int level = score / 10; // 将分数转换为 0~10 的整数作为级别划分依据
            switch (level) {
                case 10:
                case 9:
                    System.out.println("A级");
                    break;
                case 8:
                    System.out.println("B级");
                    break;
                case 7:
                    System.out.println("C级");
                    break;
                case 6:
                    System.out.println("D级");
                    break;
                default:
                    System.out.println("不合格");
            }
        }
    }
}
